package com.meizhao.api.exception;
import com.meizhao.api.utils.ResultCode;

public final class CommonException extends RuntimeException {

	private static final long serialVersionUID = -5070207368221762886L;

	private ResultCode code = ResultCode.EXCEPTION;
	
	private String msg;
	
	public ResultCode getCode() {
		return code;
	}

	public void setCode(ResultCode code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public CommonException(ResultCode code){
		this.code = code;
	}

	public CommonException(String msg){
		this.msg = msg;
	}
	
	public CommonException(ResultCode code, String msg){
		super(msg);
		this.code = code;
		this.msg = msg;
	}
	
	public CommonException(){}
}
